﻿using System;
using System.Collections.Generic;
using System.Web;

namespace ORS.BLL
{
    public class roleselect
    {
        public string SelectRole(string username)
        {
            string sRole = "";
            string sqlstr1 = "SELECT tb_role.name FROM tb_userlist INNER JOIN tb_role ON tb_userlist.roleid = tb_role.roleid WHERE tb_userlist.userid = '"+username+"'";
            ORS.DAL.DBHelper dRole = new ORS.DAL.DBHelper();
            object oRole = dRole.GetName(sqlstr1);
            if (oRole != null)
            {
                sRole = oRole.ToString();
            }
            else
            {
                sRole = "";
            }
             
            return sRole;
        }
    }
}